

package com.swe622.rmi.client.gui;

import shared.FileInfo;
import shared.ServerInfo;
/**
 *
 * @author Melanie
 */
public class GuiDataObject {

    private FileInfo myFile;
    private ServerInfo myServer;
    private String status;

    //Constructor based on file lists

    public GuiDataObject( FileInfo files, ServerInfo servers){

        myFile = files;
        myServer = servers;
    }

    //Hardcoded constructor based on strings
//       public GuiDataObject( String file, String server, String size){
//
//        String fileName = myFile.getFileName();
//        String fileSize = size;
//        String serverName = server;
//
//    }

    public FileInfo getMyFile() {
        return myFile;
    }

    public void setMyFile(FileInfo myFile) {
        this.myFile = myFile;
    }

    public ServerInfo getMyServer() {
        return myServer;
    }

    public void setMyServer(ServerInfo myServer) {
        this.myServer = myServer;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public String toString(){

        return ("File: "+myFile.getFileName()+"   Size: "+myFile.getFileSize()+
                    "   Server: "+myServer.getAddress().getHostName() +
                   "   Workload: "+ myServer.getCurrentConnections());
    }


}
